home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC-SIG: World of Games
/
PC-SIG World of Games (CDRM1080710) (1993).iso
/
55
/
HRSERACE.BAS
< prev
next >
Wrap
BASIC Source File
|
1983-02-12
|
5KB
|
138 lines
10 KEY OFF:CLS
20 PRINT"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
30 PRINT"░┌───────────────────────────────────┐░"
40 PRINT"░│ │░"
50 PRINT"░│ 2045-A.BAS │░"
60 PRINT"░│ HORSE RACES │░"
70 PRINT"░│ │░"
80 PRINT"░│ │░"
90 PRINT"░│ BROUGHT TO YOU BY THE MEMBERS OF │░"
100 PRINT"░│ ▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄▄ ▄▄▄▄▄ │░"
110 PRINT"░│ █ █ █ █ █ █ │░"
120 PRINT"░│ █ █▄▄▄█ █ █ █ │░"
130 PRINT"░│ █ █ █ █ █ │░"
140 PRINT"░│ ▄▄█▄▄ █ █▄▄▄▄ █▄▄▄█ │░"
150 PRINT"░│ │░"
160 PRINT"░│ International PC Owners │░"
170 PRINT"░│ │░"
180 PRINT"░│P.O. Box 10426, Pittsburgh PA 15234│░"
190 PRINT"░│ │░"
200 PRINT"░└───────────────────────────────────┘░"
210 PRINT"░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░"
220 PRINT
230 PRINT " PRESS ANY KEY TO CONTINUE
240 A$=INKEY$: IF A$="" THEN 240
250 CLS
1000 SAMP$="NO":GOTO 1020
1010 SAMP$="YES"
1020 KEY OFF:WIDTH 80:CLS
1030 DEF SEG=64:POKE 23,64'CAPITAL LETTERS
1040 DEF SEG=0:POKE 1050, PEEK(1052):DEF SEG:POKE 106,0
1050 RANDOMIZE VAL(MID$(TIME$,7,2)+MID$(TIME$,4,2))
1060 INPUT "INSTRUCTIONS FOR HORSE RACE GAME";Y$
1070 IF LEFT$(Y$,1)="N" THEN 1210
1080 IF LEFT$(Y$,1)<>"Y" THEN PRINT "?what?":GOTO 1060
1090 PRINT"IN THIS GAME THERE CAN BE FROM 2 TO 10 PLAYERS"
1100 PRINT"THE TOTAL MONEY AVAILABLE TO EACH IS $200.00"
1110 PRINT"YOU CAN HAVE UP TO 10 RACES IN A GAME."
1120 PRINT"WHEN THERE IS ONLY ONE PLAYER WITH MONEY,"
1130 PRINT"THE GAME IS OVER. ANY BET BEYOND THE AMOUNT"
1140 PRINT"IN THE BANK WILL BE IGNORED. ONCE YOU HAVE"
1150 PRINT"LOST IT ALL, YOU ARE DONE FOR THAT GAME."
1160 PRINT"THERE ARE 5 HORSES, #1 TO #5, TO BET ON."
1170 PRINT"THE ODDS ARE: #1 2-1,#2 3-1,#3 5-1,"
1180 PRINT"#4 10-1,#5 20-1, SO BET ACCORDINGLY."
1190 PRINT"GOOD LUCK AT THE RACES."
1200 PRINT
1210 INPUT "HOW MANY PLAYERS";X
1220 INPUT "HOW MANY RACES";Z
1230 FOR J=1 TO X
1240 C(J)=200
1250 NEXT J
1260 G=0
1270 F=0
1280 PRINT
1290 FOR J=1 TO X
1300 IF C(J)=0 THEN 1330
1310 P=J
1320 F=F+1
1330 NEXT J
1340 IF F<2 THEN 1980
1350 PRINT"TYPE THE # OF THE HORSE, THE BET FOR RACE";G+1
1360 FOR J=1 TO X
1370 IF C(J)=0 THEN 1400
1380 PRINT"PLAYER #";J;" ";
1390 INPUT E(J),D(J)
1400 IF D(J)>C(J) THEN D(J)=C(J)
1410 IF E(J)<1 THEN 1460
1420 IF E(J)>5 THEN 1460
1430 NEXT J
1440 PRINT
1450 GOTO 1480
1460 PRINT"BET ON HORSE #1 TO 5 ONLY."
1470 GOTO 1380
1480 FOR J=1 TO 5
1490 A(J)=0
1500 B(J)=1
1510 NEXT J
1520 G=G+1
1530 REM ***** START THE RACES ******
1540 PLAC=5:CLS
1550 COLOR 23:PRINT " START THE RACES";:COLOR 15:PRINT TAB(74);"END"
1560 GOSUB 2070
1570 DONE=0
1580 FOR J=1 TO 5:LOCATE J+5,1:PRINT J:A(J)=1:NEXT
1590 GOSUB 2070
1600 LOCATE 1,1:PRINT " "
1610 FOR I=1 TO 500
1620 FOR J=1 TO 5
1630 OLD=A(J):IF OLD>75 THEN OLD=75
1640 A(J)=A(J)+RND*6-J/4+1.25
1650 NW=A(J):IF NW>75 THEN NW=75:DONE=1
1660 FOR J1=OLD TO NW:LOCATE J+5,J1:PRINT " ";J;:NEXT
1670 NEXT J
1680 IF DONE=1 THEN LOCATE 1,1:PRINT " COLLECT YOUR WINNINGS":GOTO 1710
1690 NEXT I
1700 REM ***** FIND WINNER *****
1710 FOR J=1 TO 5
1720 FOR K=1 TO 5
1730 IF A(J)>A(K) THEN B(K)=B(K)+1
1740 NEXT K
1750 NEXT J
1760 PRINT
1770 FOR J=1 TO 5
1780 IF B(J)=1 THEN 1800
1790 NEXT J
1800 LOCATE 12,1:PRINT"HORSE #";J;"IS THE WINNER."
1810 FOR J=1 TO X
1820 IF B(E(J))=1 THEN 1870
1830 IF B(E(J)) <> 1 THEN C(J)=C(J)-D(J)
1840 PRINT"PLAYER #";J;"$";C(J)
1850 NEXT J
1860 GOTO 1930
1870 IF E(J)=1 THEN C(J)=C(J)+2*D(J)
1880 IF E(J)=2 THEN C(J)=C(J)+3*D(J)
1890 IF E(J)=3 THEN C(J)=C(J)+5*D(J)
1900 IF E(J)=4 THEN C(J)=C(J)+10*D(J)
1910 IF E(J)=5 THEN C(J)=C(J)+20*D(J)
1920 GOTO 1840
1930 IF G=Z THEN 1950
1940 GOTO 1270
1950 PRINT Z;"RACES HAVE BEEN RUN. THE PLAYER"
1960 PRINT"WITH THE MOST MONEY IS THE WINNER."
1970 GOTO 2020
1980 IF F=0 THEN 2010
1990 PRINT"PLAYER #";P;"IS THE WINNER"
2000 GOTO 2020
2010 PRINT"THERE IS NO WINNER"
2020 INPUT "WANT A NEW GAME";Y$
2030 IF LEFT$(Y$,1)="Y" THEN 1210
2040 IF LEFT$(Y$,1)<>"N" THEN PRINT "?what?":GOTO 2020
2050 PRINT"HOPE YOU HAD FUN AT THE RACES."
2060 IF SAMP$="YES" THEN CHAIN "SAMPLES",1000 ELSE END
2070 REM ******* WAIT ******
2080 FOR IW=1 TO 1000:NEXT
2090 RETURN
2060 IF SAMP$="YES" THEN CHAIN "SAMPLES",1000 ELSE END
2070 REM ******* WAIT ******
2080 F